package com.多线程07.demo06;

public class MyRunable implements Runnable {
    public void run() {
        for (int i=0;i<1000;i++){
            System.out.println(Thread.currentThread().getName()+"-----"+i);
        }
        System.out.println("线程执行完毕");
    }


    public static void main(String[] args) {
        MyRunable mr = new MyRunable();

        Thread t1 = new Thread(mr, "飞机");
        Thread t2 = new Thread(mr, "大炮");


        System.out.println("t1:"+t1.getPriority());
        System.out.println("t2:"+t1.getPriority());

        t1.setPriority(1);
        t2.setPriority(10);

        t1.start();
        t2.start();

    }

}
